<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>从文件向活跃的哈希运算上下文中填充数据</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.hash-update-file" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">hash_update_file</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.1.2, PHP 7, PECL hash &gt;= 1.1)</p><p class="refpurpose"><span class="refname">hash_update_file</span> &mdash; <span class="dc-title">从文件向活跃的哈希运算上下文中填充数据</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.hash-update-file-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>hash_update_file</strong></span>
    ( <span class="methodparam"><span class="type"><span class="type HashContext">HashContext</span></span> <code class="parameter">$hcontext</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code></span>
   [, <span class="methodparam"><span class="type">resource</span> <code class="parameter">$scontext</code><span class="initializer"> = <strong><code>NULL</code></strong></span></span>
  ] ) : <span class="type">bool</span></div>


 </div>

 <div class="refsect1 parameters" id="refsect1-function.hash-update-file-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">hcontext</code></dt>

     <dd>

      <p class="para">
       由 <span class="function"><a href="hash_init.html" class="function">hash_init()</a></span> 函数返回的哈希运算上下文。
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">filename</code></dt>

     <dd>

      <p class="para">
       要进行哈希运算的文件路径，支持 fopen 封装器。
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">scontext</code></dt>

     <dd>

      <p class="para">
       由 <span class="function"><a href="stream_context_create.html" class="function">stream_context_create()</a></span> 函数返回的流上下文。
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.hash-update-file-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>

 
 <div class="refsect1 changelog" id="refsect1-function.hash-update-file-changelog">
  <h3 class="title">更新日志</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>版本</th>
       <th>说明</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>7.2.0</td>
       <td>
        接收参数从资源类型修改为 <strong class="classname">HashContext</strong> 对象类型。
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.hash-update-file-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="hash_init.html" class="function" rel="rdfs-seeAlso">hash_init()</a> - 初始化增量哈希运算上下文</span></li>
    <li class="member"><span class="function"><a href="hash_update.html" class="function" rel="rdfs-seeAlso">hash_update()</a> - 向活跃的哈希运算上下文中填充数据</span></li>
    <li class="member"><span class="function"><a href="hash_update_stream.html" class="function" rel="rdfs-seeAlso">hash_update_stream()</a> - 从打开的流向活跃的哈希运算上下文中填充数据</span></li>
    <li class="member"><span class="function"><a href="hash_final.html" class="function" rel="rdfs-seeAlso">hash_final()</a> - 结束增量哈希，并且返回摘要结果</span></li>
    <li class="member"><span class="function"><a href="hash.html" class="function" rel="rdfs-seeAlso">hash()</a> - 生成哈希值 （消息摘要）</span></li>
    <li class="member"><span class="function"><a href="hash_file.html" class="function" rel="rdfs-seeAlso">hash_file()</a> - 使用给定文件的内容生成哈希值</span></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>